package com.ruoyi.radarOrder.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.radarOrder.domain.TechnicianRadarItemOrder;
import com.ruoyi.radarOrder.mapper.TechnicianRadarItemOrderMapper;
import com.ruoyi.radarOrder.service.ITechnicianRadarItemOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单雷达统计Service业务层处理
 *
 * @author ruoyi
 * @date 2025-04-15
 */
@Service
public class TechnicianRadarItemOrderServiceImpl implements ITechnicianRadarItemOrderService {
    @Autowired
    private TechnicianRadarItemOrderMapper technicianRadarItemOrderMapper;

    /**
     * 查询订单雷达统计
     *
     * @param id 订单雷达统计主键
     * @return 订单雷达统计
     */
    @Override
    public TechnicianRadarItemOrder selectTechnicianRadarItemOrderById(Long id) {
        return technicianRadarItemOrderMapper.selectTechnicianRadarItemOrderById(id);
    }

    /**
     * 查询订单雷达统计列表
     *
     * @param technicianRadarItemOrder 订单雷达统计
     * @return 订单雷达统计
     */
    @Override
    public List<TechnicianRadarItemOrder> selectTechnicianRadarItemOrderList(TechnicianRadarItemOrder technicianRadarItemOrder) {
        return technicianRadarItemOrderMapper.selectTechnicianRadarItemOrderList(technicianRadarItemOrder);
    }

    /**
     * 新增订单雷达统计
     *
     * @param technicianRadarItemOrder 订单雷达统计
     * @return 结果
     */
    @Override
    public int insertTechnicianRadarItemOrder(TechnicianRadarItemOrder technicianRadarItemOrder) {
        technicianRadarItemOrder.setCreateTime(DateUtils.getNowDate());
        return technicianRadarItemOrderMapper.insertTechnicianRadarItemOrder(technicianRadarItemOrder);
    }

    /**
     * 修改订单雷达统计
     *
     * @param technicianRadarItemOrder 订单雷达统计
     * @return 结果
     */
    @Override
    public int updateTechnicianRadarItemOrder(TechnicianRadarItemOrder technicianRadarItemOrder) {
        technicianRadarItemOrder.setUpdateTime(DateUtils.getNowDate());
        return technicianRadarItemOrderMapper.updateTechnicianRadarItemOrder(technicianRadarItemOrder);
    }

    /**
     * 批量删除订单雷达统计
     *
     * @param ids 需要删除的订单雷达统计主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianRadarItemOrderByIds(Long[] ids) {
        return technicianRadarItemOrderMapper.deleteTechnicianRadarItemOrderByIds(ids);
    }

    /**
     * 删除订单雷达统计信息
     *
     * @param id 订单雷达统计主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianRadarItemOrderById(Long id) {
        return technicianRadarItemOrderMapper.deleteTechnicianRadarItemOrderById(id);
    }
}
